home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.5 Complementary Applications 2004 February / SGI IRIX 6.5 Complementary Applications 2004 February.iso / dist / cde.idb / usr / dt / share / include / Xm / LabelP.h.z / LabelP.h
Encoding:
C/C++ Source or Header  |  2003-11-18  |  6.1 KB  |  183 lines

  1. /*
  2.  * LabelP.h
  3.  *
  4.  * Copyright 2000, Silicon Graphics, Inc.
  5.  * ALL RIGHTS RESERVED
  6.  * 
  7.  * UNPUBLISHED -- Rights reserved under the copyright laws of the United
  8.  * States.   Use of a copyright notice is precautionary only and does not
  9.  * imply publication or disclosure.
  10.  *
  11.  * U.S. GOVERNMENT RESTRICTED RIGHTS LEGEND:
  12.  * Use, duplication or disclosure by the Government is subject to restrictions
  13.  * as set forth in FAR 52.227.19(c)(2) or subparagraph (c)(1)(ii) of the Rights
  14.  * in Technical Data and Computer Software clause at DFARS 252.227-7013 and/or
  15.  * in similar or successor clauses in the FAR, or the DOD or NASA FAR
  16.  * Supplement.  Contractor/manufacturer is Silicon Graphics, Inc.,
  17.  * 2011 N. Shoreline Blvd. Mountain View, CA 94039-7311.
  18.  *
  19.  * THE CONTENT OF THIS WORK CONTAINS CONFIDENTIAL AND PROPRIETARY
  20.  * INFORMATION OF SILICON GRAPHICS, INC. ANY DUPLICATION, MODIFICATION,
  21.  * DISTRIBUTION, OR DISCLOSURE IN ANY FORM, IN WHOLE, OR IN PART, IS STRICTLY
  22.  * PROHIBITED WITHOUT THE PRIOR EXPRESS WRITTEN PERMISSION OF SILICON
  23.  * GRAPHICS, INC.
  24.  */
  25. /* 
  26.  * @OSF_COPYRIGHT@
  27.  * (c) Copyright 1990, 1991, 1992, 1993, 1994 OPEN SOFTWARE FOUNDATION, INC.
  28.  * ALL RIGHTS RESERVED
  29.  *  
  30. */ 
  31. /*
  32.  * HISTORY
  33.  * Motif Release 1.2.5
  34. */
  35. /*   $XConsortium: LabelP.h /main/cde1_maint/2 1995/08/18 19:09:30 drk $ */
  36. /*
  37. *  (c) Copyright 1989, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */
  38. /*
  39. *  (c) Copyright 1987, 1988, 1989, 1990, 1991, 1992 HEWLETT-PACKARD COMPANY */
  40. #ifndef _XmLabelP_h
  41. #define _XmLabelP_h
  42.  
  43. #include <Xm/Label.h>
  44. #include <Xm/PrimitiveP.h>
  45.  
  46.  
  47. #define XmUNSPECIFIED        (~0)
  48.  
  49. #ifdef __cplusplus
  50. extern "C" {
  51. #endif
  52.  
  53. /*  The Label Widget Class and instance records  */
  54.  
  55. typedef struct _XmLabelClassPart     /* label class record */
  56. {
  57.         XtWidgetProc    setOverrideCallback;
  58.     XmMenuProc    menuProcs;
  59.         String  /* XtTranslations */  translations;
  60.         XtPointer        extension; /* Pointer to extension record */
  61. } XmLabelClassPart;
  62.  
  63. typedef struct _XmLabelClassRec
  64. {
  65.     CoreClassPart        core_class;
  66.     XmPrimitiveClassPart primitive_class;
  67.     XmLabelClassPart     label_class;
  68. } XmLabelClassRec;
  69.  
  70. externalref XmLabelClassRec xmLabelClassRec;
  71.  
  72.  
  73. /* Inherited  Functions exported by label */
  74.  
  75. #define XmInheritSetOverrideCallback ((XtWidgetProc) _XtInherit)
  76. #define XmInheritResize  ((XtWidgetProc) _XtInherit)
  77. #define XmInheritRealize  ((XtRealizeProc) _XtInherit)
  78.  
  79. /* The padding between label text and accelerator text */
  80.  
  81. # define LABEL_ACC_PAD         15
  82.  
  83. /*  The Label instance record  */
  84.  
  85. typedef struct _XmLabelPart
  86. {
  87.     _XmString    _label;  /* String sent to this widget */
  88.         _XmString    _acc_text;
  89.      KeySym        mnemonic;
  90. /**        char            mnemonic;    **/
  91.         XmStringCharSet mnemonicCharset;
  92.         char         *accelerator;
  93.         unsigned char    label_type;
  94.         unsigned char    alignment;
  95.         unsigned char    string_direction;
  96.         XmFontList    font;
  97.     
  98.     Dimension    margin_height;   /* margin around widget */
  99.         Dimension    margin_width;
  100.  
  101.     Dimension     margin_left;    /* additional margins on */
  102.         Dimension    margin_right;   /* each side of widget */
  103.         Dimension    margin_top;     /* text (or pixmap) is placed */
  104.         Dimension    margin_bottom;  /* inside the margins */
  105.  
  106.         Boolean     recompute_size;
  107.  
  108.         Pixmap        pixmap; 
  109.         Pixmap        pixmap_insen; 
  110.  
  111.         /* PRIVATE members -- values computed by LabelWidgetClass methods */
  112.  
  113.         GC        normal_GC;   /* GC for text */    
  114.         GC        insensitive_GC;
  115.         XRectangle    TextRect;    /* The bounding box of the text, or clip
  116.                                         rectangle of the window; whichever is
  117.                                         smaller */
  118.         XRectangle    acc_TextRect; /* The bounding box of the text, or clip
  119.                                         rectangle of the window; whichever is
  120.                                         smaller */
  121.  
  122.     Boolean        skipCallback; /* set by RowColumn when entryCallback
  123.                     is provided. */
  124.     unsigned char   menu_type;
  125.  
  126. } XmLabelPart;
  127.  
  128.  
  129. typedef struct _XmLabelRec
  130. {
  131.    CorePart         core;
  132.    XmPrimitivePart  primitive;
  133.    XmLabelPart        label;
  134. } XmLabelRec;
  135.  
  136. /* MACROS */
  137.  
  138. #define Lab_MarginWidth(w)        (((XmLabelWidget)(w)) ->label.margin_width)
  139. #define Lab_MarginHeight(w)        (((XmLabelWidget)(w)) ->label.margin_height)
  140. #define Lab_MarginTop(w)        (((XmLabelWidget)(w)) ->label.margin_top)
  141. #define Lab_MarginBottom(w)        (((XmLabelWidget)(w)) ->label.margin_bottom)
  142. #define Lab_MarginRight(w)        (((XmLabelWidget)(w)) ->label.margin_right)
  143. #define Lab_MarginLeft(w)        (((XmLabelWidget)(w)) ->label.margin_left)
  144. #define Lab_TextRect_x(w)        (((XmLabelWidget)(w)) ->label.TextRect.x)
  145. #define Lab_TextRect_y(w)        (((XmLabelWidget)(w)) ->label.TextRect.y)
  146. #define Lab_TextRect_width(w)        (((XmLabelWidget)(w)) ->label.TextRect.width)
  147. #define Lab_TextRect_height(w)        (((XmLabelWidget)(w)) ->label.TextRect.height)
  148.  
  149. #define Lab_IsText(w)            (((XmLabelWidget)(w)) ->label.label_type == XmSTRING)
  150. #define Lab_IsPixmap(w)            (((XmLabelWidget)(w)) ->label.label_type == XmPIXMAP)
  151.  
  152. #define Lab_Font(w)            (((XmLabelWidget)(w)) ->label.font)
  153.  
  154. #define Lab_Mnemonic(w)            (((XmLabelWidget)(w)) ->label.mnemonic)
  155. #define Lab_Accelerator(w)        (((XmLabelWidget)(w)) ->label.accelerator)
  156. #define Lab_AcceleratorText(w)        (((XmLabelWidget)(w)) ->label.acc_text)
  157. #define Lab_MenuType(w)            (((XmLabelWidget)(w))->label.menu_type)
  158. #define Lab_Shadow(w)                   (((XmLabelWidget)(w))->primitive.shadow_thickness)
  159. #define Lab_Highlight(w)                (((XmLabelWidget)(w))->primitive.highlight_thickness)
  160. #define Lab_Baseline(w)                 (_XmStringBaseline ( \
  161.                                          ((XmLabelWidget)(w))->label.font,\
  162.                                          ((XmLabelWidget)(w))->label._label))
  163. /********    Private Function Declarations    ********/
  164. #ifdef _NO_PROTO
  165.  
  166. extern void _XmCalcLabelDimensions() ;
  167.  
  168. #else
  169.  
  170. extern void _XmCalcLabelDimensions( 
  171.                         Widget wid) ;
  172.  
  173. #endif /* _NO_PROTO */
  174. /********    End Private Function Declarations    ********/
  175.  
  176.  
  177. #ifdef __cplusplus
  178. }  /* Close scope of 'extern "C"' declaration which encloses file. */
  179. #endif
  180.  
  181. #endif /* _XmLabelP_h */
  182. /* DON'T ADD ANYTHING AFTER THIS #endif */
  183.